package com.maimao.user.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.user.Foot;
import com.maimao.user.client.factory.GoodsFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/22 7:54 下午
 */
@RequestMapping("/goods/goods")
@FeignClient(contextId = "goodsClient", value = ServiceContainer.GOODS_SERVICE, fallbackFactory = GoodsFallBackFactory.class, configuration = FeignInterceptor.class)
public interface GoodsClient {

    /**
     * 检查sku是否有效
     */
    @PostMapping("/foot-goods")
    public Result<List<Foot>> userFoot(@RequestBody List<Long> goodsIdList);
}
